<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Vipster</title>
        <link rel="icon" type="image/png" href="images/favicon.png">
        <link rel="stylesheet" href="css/styles.css">
<script>
    document.addEventListener("DOMContentLoaded", event => {
        // get latest stable release
        fetch("https://api.github.com/repos/sgsaenger/vipster/releases/latest")
        .then(response => response.ok ? response.json() : Promise.reject("Stable relase unavailable"))
        .then(release => {
            let header = document.getElementById('stable-head');
            header.innerHTML += `: ${release.name ? release.name : release.tag_name}`;
            let par = document.getElementById('stable-links');
            var list = `Otherwise, you can download and install these releases directly:<ul>`;
            for(asset of release.assets){
                list += `<li><a href=${asset.browser_download_url}>${asset.name}</a></li>`;
            }
            list += "</ul>";
            par.innerHTML = list;
        })
        .catch(e => console.log(e))
        // get latest development artifacts
        let get_run = fetch("https://api.github.com/repos/sgsaenger/vipster/actions/runs")
            .then(response => response.ok ? response.json() : Promise.reject("CI runs unavailable"))
            .then(runs => runs.workflow_runs.find(run =>
                run.status == "completed" &&
                run.conclusion == "success" &&
                run.event != "pull_request"))
        let get_artifacts = get_run.then(run => run === undefined ?
                Promise.reject("No valid CI-artifacts") :
                fetch(run.artifacts_url))
                .then(response => response.json())
        Promise.all([get_run, get_artifacts]).then(function([run, artifacts]){
            console.log(run);
            console.log(artifacts);
            let par = document.getElementById('unstable');
            var list = `<h2>Development release (unstable):</h2>
                These builds are generated automatically and are more up to date, but may contain more bugs:
                <ul>`;
            for(artifact of artifacts.artifacts){
                list += `<li><a href=https://github.com/sgsaenger/vipster/suites/${run.check_suite_id}/artifacts/${artifact.id}>${artifact.name}</a></li>`;
            }
            list += "</ul>";
            par.innerHTML += list;
        })
        .catch(e => console.log(e))
    });
</script>

    </head>
    <body>
        <nav class="navbar flex">
            <a class="menuitem flex" href="index.html"> Vipster</a>
            <div class="menu flex">
                <a class="menuitem flex" href="about.html">About</a>
                <a class="menuitem flex" href="gui.html">Documentation</a>
                <a class="menuitem flex menuitem-active" href="download.html">Download</a>
            </div>
        </nav>
        <main class="grid">
<ol class="content-list">
    <li><a href="#binary">Desktop version</a></li>
    <li><a href="#web">Browser version</a></li>
    <li><a href="#python">Python library</a></li>
    <li><a href="#source">Build from source</a></li>
</ol>

<div class="content-text highlight">
<a class="anchor" id="binary"></a>
<h1>Desktop version</h1>

<h2 id="stable-head">Stable release</h2>
<p>
The preferred way to install Vipster is via a package manager.
</p>
<p>
It is available in these repositories:
</p>
<a href="https://repology.org/project/vipster/versions">
    <img src="https://repology.org/badge/vertical-allrepos/vipster.svg" alt="Packaging status">
</a>

<p id="stable-links">
    Otherwise, please find precompiled builds <a href="https://github.com/sgsaenger/vipster/releases">here</a>.
</p>

<h3> Installation instructions </h3>
<ul>
<li>
    Windows: <br>
    Unpack the archive, then simply run <code>Vipster.exe</code>.
</li>
<li>
    Linux: <br>
    After downloading the AppImage, make it executable:
    <pre class="highlight highlight-nested"><code>$ chmod +x Vipster-Linux-x86_64.AppImage</code></pre>
    You can then run it directly:
    <pre class="highlight highlight-nested"><code>$ ./Vipster-Linux-x86_64.AppImage</code></pre>
    or integrate it into your system by installing <a href="https://github.com/TheAssassin/AppImageLauncher">AppImageLauncher</a>.
</li>
</ul>

<div id="unstable">
</div>
</div>

<div class="content-text highlight">
<a class="anchor" id="web"></a>
<h1>Browser version</h1>
<p>
Vipster can also run in your browser.
A standalone application can be found <a href="emscripten">here</a>.<br>
This is a full visualization tool, but lacks many of the editing features of the desktop application.
</p>
<p>
If you want to include Vipster in your own web application, you can find it on npm:
</p>
<pre class="highlight highlight-nested"><code>npm install vipster</code></pre>
<p>
Note: rendering requires WebGL2 which unfortunately is blocked by Apple in its Safari browser. Sorry!
</p>
</div>

<div class="content-text highlight">
<a class="anchor" id="python"></a>
<h1>Python bindings</h1>
<p>
If you want to use the Vipster library in your Python environments, you can install them via:
</p>
<pre class="highlight highlight-nested"><code>$ pip install vipster</code></pre>
<p>
Note:
<ul>
<li>if you installed Vipster via a package manager, the bindings may already be installed for your system Python installation</li>
<li>if you install Vipster via <code>pip</code>, the GUI is not included</li>
</ul>
</p>

<div class="content-text highlight highlight-nested">
<h2>Jupyter widget</h2>
<p>
Vipster can also be integrated with <a href="https://jupyter.org">Jupyter</a>.<br>
Please go to the <a href="https://github.com/sgsaenger/vipsterview">VipsterView repository</a>
to find out more.
</p>
</div>
</div>

<div class="content-text highlight">
<a class="anchor" id="source"></a>
<h1>Build from source</h1>
<p>
    To build Vipster from source, you need <a href="https://cmake.org">CMake</a> (&ge; 3.9)
    and a C++-17 compatible compiler (including <code>&lt;filesystem&gt;</code> support).
</p>
<p>
    To build the GUI, you also need to install Qt &ge; 5.10.
</p>
<p>
    For detailed build instructions, please refer to
    <a href="https://github.com/sgsaenger/vipster/blob/master/INSTALL.md"><code>INSTALL.md</code></a>.
    Other dependencies are described in
    <a href="https://github.com/sgsaenger/vipster/blob/master/external/README.md"><code>external/README.md</code></a>.
</p>
<p>
    It is recommended to obtain the source via Git:
</p>
    <pre class="highlight highlight-nested"><code>$ git clone https://github.com/sgsaenger/vipster</code></pre>
<p>
    This allows to easily track development and automatically obtain missing dependencies.
</p>

</div>

        </main>
        <footer class="grid">
            <div class="content-text footer">
                <p>Follow Vipster on <a href="https://github.com/sgsaenger/vipster">GitHub</a></p>
                <p></p>
                <p><a href="#">Back to top</a></p>
            </div>
        </footer>
    </body>
</html>